package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 问卷调查主表
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Data
@DbTable(tableName = "t_questionnaire")
public class Questionnaire extends BaseEntity {
        /**
     * 日期
     */
    @DbTableField(columnName = "c_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime date ;

    /**
     * 名称
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name ;

    /**
     * 内容
     */
    @DbTableField(columnName = "c_content", dbType = DbTypeEnum.VARCHAR)
    public String content ;

    /**
     * 调查单位
     */
    @DbTableField(columnName = "c_dept", dbType = DbTypeEnum.VARCHAR)
    public String dept ;

    /**
     * 创建人
     */
    @DbTableField(columnName = "c_user_id", dbType = DbTypeEnum.INTEGER)
    public Integer userId ;

    /**
     * 状态 1  待调查  2 调查中  3 结束
     */
    @DbTableField(columnName = "c_status", dbType = DbTypeEnum.INTEGER)
    public Integer status ;

    /**
     * 修改人
     */
    @DbTableField(columnName = "c_db_update_id", dbType = DbTypeEnum.INTEGER)
    public Integer dbUpdateId ;

    /**
     * 修改时间
     */
    @DbTableField(columnName = "c_db_update_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime dbUpdateDate ;


    @ApiModelProperty(value = "题目列表")
    private List<QuestionnaireDetail> detailList;

    @ApiModelProperty(value = "openid")
    private String openid;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "答案")
    private List<QuestionnaireAnswer> answerList;
}
